<?php

abstract class InputField extends Validatable 
{
	private $inputType;
	/**
	 * 
	 */
	public function __construct($inputType, $name, $value = '')
	{
		$this->setName($name);
		$this->setValue($value);
		$this->inputType = $inputType;
		$this->setExtraAttribute('class', $inputType);
	}
	
	/**
	 * 
	 * @see HTMLElement::getHTML()
	 */
	public function getHTML() {
		$html = '<input type="'.$this->inputType.'" ';
		$html = $this->addAttributes($html);
		if(is_null($this->value))
		{
			//$html .= ' placeholder="NULL"';
		}
		$html .= ' />';	
		return $html;
	}
}